﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _01_委托的必要性
{
    //1.定义委托
    public delegate void DoSomne();

    internal class Program
    {
        static void Main(string[] args)
        {
            //2.定义委托对象
            DoSomne doSome = null;
            //4.绑定具体方法
            doSome = new DoSomne(DoWork);
            //5.调用委托
            doSome();

            Console.Read();
        }


        //3.具体实现方法
        public static void DoWork()
        {
            Console.WriteLine("Hi");
        }

    }
}
